package com.msb.test03;

public class TestWhile {
    public static void main(String[] args) {
        int num1 = 1;
        int num2 = 2;
        int num3 = 3;
        int num4 = 4;
        int num5 = 5;
        int sum = 0;
        int i = 0;
        while (i<8){
            i++;
            sum +=i;

        }
        System.out.println(sum);

        for (i = 0; i < 6; i++) {
            sum +=i;
        }
        System.out.println(sum);

    }
}
